﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category9
{
  public class MT900 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagChoiceDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagDefinition U0018;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT900.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Related Reference")]
    public Tag21 RelatedReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT900.U0004);
      }
    }

    [Description("Related Reference")]
    public Tag21 Tag21_RelatedReference
    {
      get
      {
        return this.RelatedReference_21;
      }
    }

    [Description("Account Identification")]
    public Tag25 AccountIdentification_25
    {
      get
      {
        return new Tag25((SwiftElement) this, 0, (SwiftDefinitionElement) MT900.U0006);
      }
    }

    [Description("Account Identification")]
    public Tag25 Tag25_AccountIdentification
    {
      get
      {
        return this.AccountIdentification_25;
      }
    }

    [Description("Value Date,Currency Code and Amount")]
    public Tag32A ValueDateCurrencyCodeAmount_32A
    {
      get
      {
        return new Tag32A((SwiftElement) this, 0, (SwiftDefinitionElement) MT900.U0008);
      }
    }

    [Description("Value Date,Currency Code and Amount")]
    public Tag32A Tag32A_ValueDateCurrencyCodeAmount
    {
      get
      {
        return this.ValueDateCurrencyCodeAmount_32A;
      }
    }

    [Description("Ordering Institution")]
    public Tag52A OrderingInstitution_52A
    {
      get
      {
        return new Tag52A((SwiftElement) this, 0, (SwiftDefinitionElement) MT900.U0012);
      }
    }

    [Description("Ordering Institution")]
    public Tag52A Tag52A_OrderingInstitution
    {
      get
      {
        return this.OrderingInstitution_52A;
      }
    }

    [Description("Ordering Institution")]
    public Tag52D OrderingInstitution_52D
    {
      get
      {
        return new Tag52D((SwiftElement) this, 0, (SwiftDefinitionElement) MT900.U0015);
      }
    }

    [Description("Ordering Institution")]
    public Tag52D Tag52D_OrderingInstitution
    {
      get
      {
        return this.OrderingInstitution_52D;
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT900.U0018);
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT900()
      : base(true)
    {
    }

    public MT900(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT900.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT900.MessageDefinition = new SwiftMessageDefinition("MT900", "Confirmation of Debit");
      MT900.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT900.U0002.TagName = ":20:";
      MT900.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT900.U0002.Elements.Add((SwiftDefinitionElement) MT900.U0003);
      MT900.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT900.U0002);
      MT900.U0004 = new SwiftTagDefinition("RelatedReference_21", "Related Reference");
      MT900.U0004.TagName = ":21:";
      MT900.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT900.U0004.Elements.Add((SwiftDefinitionElement) MT900.U0005);
      MT900.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT900.U0004);
      MT900.U0006 = new SwiftTagDefinition("AccountIdentification_25", "Account Identification");
      MT900.U0006.TagName = ":25:";
      MT900.U0007 = new SwiftTagSubItemDefinition("Account", "Account");
      MT900.U0006.Elements.Add((SwiftDefinitionElement) MT900.U0007);
      MT900.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT900.U0006);
      MT900.U0008 = new SwiftTagDefinition("ValueDateCurrencyCodeAmount_32A", "Value Date,Currency Code and Amount");
      MT900.U0008.TagName = ":32A:";
      MT900.U000E = new SwiftTagSubItemDefinition("Date", "Date");
      MT900.U0008.Elements.Add((SwiftDefinitionElement) MT900.U000E);
      MT900.U000F = new SwiftTagSubItemDefinition("CurrencyCode", "Currency Code");
      MT900.U0008.Elements.Add((SwiftDefinitionElement) MT900.U000F);
      MT900.U0010 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT900.U0008.Elements.Add((SwiftDefinitionElement) MT900.U0010);
      MT900.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT900.U0008);
      MT900.U0011 = new SwiftTagChoiceDefinition("Choice", "");
      MT900.U0011.Mandatory = false;
      MT900.U0011.Multiple = true;
      MT900.U0012 = new SwiftTagDefinition("OrderingInstitution_52A", "Ordering Institution");
      MT900.U0012.TagName = ":52A:";
      MT900.U0012.Mandatory = false;
      MT900.U0013 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT900.U0013.Mandatory = false;
      MT900.U0012.Elements.Add((SwiftDefinitionElement) MT900.U0013);
      MT900.U0014 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT900.U0012.Elements.Add((SwiftDefinitionElement) MT900.U0014);
      MT900.U0011.Elements.Add((SwiftDefinitionElement) MT900.U0012);
      MT900.U0015 = new SwiftTagDefinition("OrderingInstitution_52D", "Ordering Institution");
      MT900.U0015.TagName = ":52D:";
      MT900.U0015.Mandatory = false;
      MT900.U0016 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT900.U0016.Mandatory = false;
      MT900.U0015.Elements.Add((SwiftDefinitionElement) MT900.U0016);
      MT900.U0017 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT900.U0015.Elements.Add((SwiftDefinitionElement) MT900.U0017);
      MT900.U0011.Elements.Add((SwiftDefinitionElement) MT900.U0015);
      MT900.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT900.U0011);
      MT900.U0018 = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender To Receiver Information");
      MT900.U0018.TagName = ":72:";
      MT900.U0018.Mandatory = false;
      MT900.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT900.U0018);
    }
  }
}
